var common = require('./common');
var store = common.store;
var getFile = common.getFile;

module.exports = {

  // mock freeMarker 文件
  "get /admin/:module.html": function(req, res) {
    var module = req.param('module');
    this.render.ftl(getFile(module), store);
  },
  // mock freeMarker 文件
  "get /admin/question/:module.html": function(req, res) {
    var module = req.param('module');
    this.render.ftl(getFile('question/' + module), store);
  },
  "get /admin/question/:module1/:module2.html": function(req, res) {
    var module1 = req.param('module1');
    var module2 = req.param('module2');
    this.render.ftl(getFile('question/' + module1 + '/' + module2), store);
  },
  // mock freeMarker 文件
  "get /admin/knowledge/:module.html": function(req, res) {
    var module = req.param('module');
    this.render.ftl(getFile('knowledge/' + module), store);
  },
  "get /admin/knowledge/:module1/:module2.html": function(req, res) {
    var module1 = req.param('module1');
    var module2 = req.param('module2');
    this.render.ftl(getFile('knowledge/' + module1 + '/' + module2), store);
  }


};
